<?php

class Kieumau_Controller_Frontend extends Kieumau_Controller_MainController//Zend_Controller_Action
{
	
	public function init(){
		
		parent::init();
		
	}
	 public function sendEmail($mailto, $subject, $body) {
  		$authDetails = new Zend_Mail_Transport_Smtp ( 'smtp.gmail.com',
		    array ('auth' => 'login',
		      'username' => 'tmt@86solutions.com',
		      'password' => 'test12345',
		      'ssl' => 'SSL',
		      'port' => 465 ) );
		Zend_Mail::setDefaultTransport ( $authDetails );
  		$message = $subject;
  		$mail = new Zend_Mail ( 'UTF-8' );
  		$mail->setBodyHtml ( $body );
  		$mail->addTo ($mailto);
  		$mail->setSubject ( $subject );
  		try{
  			$mail->send();
  		}catch(Exception $ex)
  		{
  			echo '<br/> Send mail erorr, Error :'.$ex->getMessage();
  			exit;
  		}
    }
	
	public function test(){
		return "ok";	
	}
}
